package com.ebelter.bodyfatscale.ui.pager.register;

import android.app.Activity;
import android.content.Context;
import android.view.View;

import com.ebelter.bodyfatscale.R;
import com.ebelter.bodyfatscale.ui.activity.AddUserInfoActivity;
import com.ebelter.bodyfatscale.ui.activity.GuestSelectWriteInfoActivity;

import butterknife.OnClick;


/**
 * 生日页
 */

public class RolePager extends BasePager {



    public RolePager(Context context) {
        super(context);
    }

    @Override
    protected int loadLayoutById() {
        return R.layout.pager_role;
    }

    @Override
    public void initViews() {



    }
    @OnClick({R.id.role_no_bt_tv, R.id.role_yes_bt_tv})
    public void btClick(View view) {

        switch (view.getId()) {
            case R.id.role_no_bt_tv:


                done(false);
                break;
            case R.id.role_yes_bt_tv:
               // ((GuestSelectWriteInfoActivity)getActivity()).done(true);
                done(true);
                break;
        }


    }

    private void done(boolean isAthlete){
        Activity activity = getActivity();
        if (activity instanceof GuestSelectWriteInfoActivity){
            ((GuestSelectWriteInfoActivity)getActivity()).done(isAthlete);
        }else if (activity instanceof AddUserInfoActivity){
            ((AddUserInfoActivity)getActivity()).done(isAthlete);
        }
    }




}
